package xdu.lz.stage1_basic.chapter2_api.b_stackSize;

public class Code02_ThreadStackSize {
    private static int counter = 0;

    public static void main(String[] args) {

        try {
            add(0);
        } catch (Error e) {
            e.printStackTrace();
            System.out.println("入虚拟机栈次数:"+counter);
        }
    }
    private static void add(int i){
        ++counter;
        add(i+1);
    }
}
